#include "common.h"

std::string common::wstr_to_str(std::wstring in_text)
{
	std::string ret = "";

	int buffer_length = in_text.length() + 1;
	char *buffer = new char[buffer_length];

	buffer_length = wcstombs (buffer, in_text.c_str(), buffer_length - 1);
	buffer[buffer_length]='\0';

	ret = buffer;

	delete []buffer;

	return ret;
}